]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
st/entry: Only handle primary/secondary icon clicks when reactive
authorFlorian Müllner <fmuellner@gnome.org>
Wed, 9 Sep 2020 18:51:53 +0000 (20:51 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Mon, 21 Sep 2020 20:51:48 +0000 (22:51 +0200)
Just like the internal ClutterText, the icon actors are part of the
entry. It therefore makes sense for the icons to not react to clicks
when the entry itself is non-reactive; again, just like the text.

That behavior is also consistent with icons in GTK entries.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3138

src/st/st-entry.c

index fdf0168c97320c38a273b9b24c7d4ed85b295d98..043be6a7cce6d84d71cf72f7445eda13c95d4e25 100644 (file)
@@ -1312,6 +1312,9 @@ _st_entry_icon_clicked_cb (ClutterClickAction *action,
 {
   StEntryPrivate *priv = ST_ENTRY_PRIV (entry);
 
+  if (!clutter_actor_get_reactive (CLUTTER_ACTOR (entry)))
+    return;
+
   if (actor == priv->primary_icon)
     g_signal_emit (entry, entry_signals[PRIMARY_ICON_CLICKED], 0);
   else